<template>
  <CommonPage :show-header="false">
    <div class="wh-full flex">
      <el-result
        class="m-auto"
        status="403"
        title="403 禁止访问"
        sub-title="抱歉，您暂无权限访问，请联系管理员开通权限。"
        size="large"
      >
        <template #extra>
          <el-button
            v-if="back"
            type="primary"
            ghost
            @click="router.replace(back)"
          >
            返回上一页
          </el-button>
          <el-button type="primary" class="ml-20" @click="router.replace('/')"
            >返回首页</el-button
          >
        </template>
      </el-result>
    </div>
  </CommonPage>
</template>

<script lang="ts" setup>
import { CommonPage } from "@/components/common/index.js";

const router = useRouter();

const back = history.state.back;
</script>
